home *** CD-ROM | disk | FTP | other *** search
- Path: newsbf02.news.aol.com!not-for-mail
- From: mvaccaro1@aol.com (MVaccaro1)
- Newsgroups: comp.lang.c
- Subject: Re: Float to String
- Date: 21 Mar 1996 16:18:01 -0500
- Organization: America Online, Inc. (1-800-827-6364)
- Sender: root@newsbf02.news.aol.com
- Message-ID: <4ish29$7eq@newsbf02.news.aol.com>
- References: <4is29s$h1a@dfw-ixnews6.ix.netcom.com>
- Reply-To: mvaccaro1@aol.com (MVaccaro1)
- NNTP-Posting-Host: newsbf02.mail.aol.com
-
- >Is it possible to convert a float to a string? like the itoa function.
-
- You might want to try sprintf.
-
- main( )
- {
- double x=5.6;
- char str[30];
-
- sprintf( str, "%f", x ); /* convert double x to string */
- .
- .
- .
- }
-
- Mike :->
-
- Design? What design! - I've too much coding to do...
-